USE DB_TCC
IF EXISTS(SELECT 1 FROM SYSOBJECTS WHERE NAME LIKE 'P_VAGA_ALTERAR')
	DROP PROCEDURE P_VAGA_ALTERAR
GO
CREATE PROCEDURE P_VAGA_ALTERAR(
	@IDVAGA		INTEGER,
	@DESCVAGA	VARCHAR(255),
	@QTDEVAGAS	INTEGER,
	@USUARIO	VARCHAR(100))
AS BEGIN
	UPDATE
		VAGA
	SET
		DESCVAGA = @DESCVAGA,
		QTDEVAGAS = @QTDEVAGAS,
		USUARIOALTERACAO = @USUARIO,
		DTHRALTERACAO = GETDATE()
	WHERE
		IDVAGA = @IDVAGA
END